package com.xmkj.winmoney.jifen;

import android.content.Context;

import com.common.Entity.DuoBaoWangQiEntitiy;
import com.common.widget.recyclerview.refresh.adapter.CommonAdapter;
import com.common.widget.recyclerview.refresh.adapter.ViewHolder;
import com.xmkj.winmoney.R;

import java.util.List;

/**
 * Create by leo
 * 创建日期：2018/5/23
 * 描述：
 */

public class DuoBaoWangQiAdapter extends CommonAdapter<DuoBaoWangQiEntitiy.ListsEntity> {
    public DuoBaoWangQiAdapter(Context context, List<DuoBaoWangQiEntitiy.ListsEntity> data) {
        super(context, data);
    }

    @Override
    protected void convert(ViewHolder holder, DuoBaoWangQiEntitiy.ListsEntity item, int position) {
        holder.setText(R.id.tv_qi_time, "第" + item.fvid + "期( 揭晓时间：" + item.opentime + ")");
        holder.setText(R.id.tv_ip, item.address + "ip：" + item.ip);
        holder.setText(R.id.tv_id, "用户id：" + item.uid);
        holder.setText(R.id.tv_name, "获奖者：" + item.nickname);
        holder.setText(R.id.tv_lucky_num, "幸运号码：" + item.lucky);
        holder.setText(R.id.tv_renci, "本期参与：" + item.num + " 人次");

    }

    @Override
    protected int getItemViewLayoutId(int position, DuoBaoWangQiEntitiy.ListsEntity item) {
        return R.layout.item_duobaojiexiao;
    }
}
